import request from "../axios";

// 获取数据

export const fetchData = () => request({
    url: "/posts",
    method: "get",
});

// 数据搜索
export const queryData = (value: string) => request({
    url: `/posts/${value}`,
    method: "get",
});

// 数据删除
export const delData = (id: number) => request({
    url: `/posts/${id}`,
    method: "DELETE",
});